home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / archiver / arc.zoo / utimes.c < prev   
C/C++ Source or Header  |  1988-11-17  |  342b  |  24 lines

  1.  
  2. /* bsd utimes emulation for Sys V */
  3. /* by Jon Zeeff */
  4.  
  5. #include <sys/types.h>
  6.  
  7.  
  8. struct timeval {
  9.      long    tv_sec;
  10.      long    tv_usec;
  11. };
  12.  
  13. utimes(path,tvp)
  14. char *path;
  15. struct timeval tvp[2];
  16. {
  17.     time_t utimbuf[2];
  18.  
  19.     utimbuf[0] = (time_t) tvp[0].tv_sec;
  20.     utimbuf[1] = (time_t) tvp[1].tv_sec;
  21.  
  22.     return utime(path,utimbuf);
  23. }
  24.